/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package job;

import infr.Logger4j;
import org.quartz.JobExecutionContext;
import org.quartz.Trigger;
import org.quartz.TriggerListener;

/**
 *
 * @author bighead
 */
public class CalculateTimeTriggerListener implements TriggerListener {

    @Override
    public String getName() {
        return "CalculateTimeTriggerListener";
    }

    @Override
    public void triggerFired(Trigger trigger, JobExecutionContext context) {
        Logger4j.info(getName() + ":triggerFired, Trigger Name:" + trigger.getName());
    }

    @Override
    public boolean vetoJobExecution(Trigger trigger, JobExecutionContext context) {
        Logger4j.info(getName() + ":vetoJobExecution, Trigger Name:" + trigger.getName());
        return false;
    }

    @Override
    public void triggerMisfired(Trigger trigger) {
        Logger4j.info(getName() + ":triggerMisfired, Trigger Name:" + trigger.getName());
    }

    @Override
    public void triggerComplete(Trigger trigger, JobExecutionContext context, int triggerInstructionCode) {
        Logger4j.info(getName() + ":triggerComplete, Trigger Name:" + trigger.getName() + ", triggerInstructionCode:" + triggerInstructionCode);
    }

}
